{include file="public_head"}
{include file="public_menu"}
<style>
    .tab_record_con>div{
        display:none;
    }
    .tab_record_con .cur{
        display:block;
    }

</style>
    <div class="content_center">
        <div class="main_center">
            {include file="public_information_menu"}
            <div class="main_right right">
                <div class="main_right_title">明细<span class="right"></div>
                <div class="integral_con">
                    <div class="integral_num">
                        <table border="0">
                            <tr>
                                <td class="usable">
                                    <span class="title">可用的积分</span>
                                    <div class="number normal">{$data.integral}</span></div>
                                </td>
                                <td class="list">
                                    <div>全部余额：{$data.balance}</div>
                                    <!--<div>锁定余额：0</div>-->
                                    <div>账户状态：有效</div>
                                </td>
                                <td class="button">
                                    <input type="button" value="充值" style="margin-bottom: 10px;" onclick="recharge()">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="tab_record">
                        <ul>
                            <li {eq name=":input('type')" value="" }class="active"{/eq}><a href="{:url('member_wallet/index')}">全部</a></li>
                            <li {eq name=":input('type')" value="1" }class="active"{/eq}><a href="{:url('member_wallet/index',['type'=>1])}">充值</a></li>
                            <li {eq name=":input('type')" value="2" }class="active"{/eq}><a href="{:url('member_wallet/index',['type'=>2])}">提现</a></li>
                            <li {eq name=":input('type')" value="3" }class="active"{/eq}><a href="{:url('member_wallet/index',['type'=>3])}">消费</a></li>
                        </ul>
                    </div>
                    <div class="tab_record_con">
                        <div class="integral_det cur">
                            <table border="0">
                                <tr class="title">
                                    <th class="text-center origin"><span>来源/用途</span></th>
                                    <th class="text-center number"><span>金额变化</span></th>
                                    <th class="text-center date"><span>日期</span></th>
                                </tr>
                                {volist name="revenue" id="vo"}
                                <tr class="det">
                                    <td class="text-left origin">
                                        <div class="media">
                                            <div class="media-left">
                                                <a href="#">
                                                    {switch name="$vo.type_id"}
                                                    {case value="1"}
                                                    <img class="media-object" src="__STATIC__/img/logo25.jpg">
                                                    {/case}
                                                    {case value="2"}
                                                    <img class="media-object" src="__STATIC__/img/tixian.png">
                                                    {/case}
                                                    {case value="3"}
                                                    <img class="media-object" src="/{$vo.goods.thumb_img}" onerror="this.src='/static/shop/img/232.png'">
                                                    {/case}
                                                    {case value="5"}
                                                    <img class="media-object" src="__STATIC__/img/logo25.jpg">
                                                    {/case}
                                                    {/switch}
                                                </a>
                                            </div>
                                            <div class="media-body">
                                                {switch name="$vo.type_id"}
                                                {case value="1"}
                                                <div class="goods_name">余额充值</div>
                                                {/case}
                                                {case value="2"}
                                                <div class="goods_name">余额提现</div>
                                                {/case}
                                                {case value="3"}
                                                <div class="goods_name">{$vo.goods.title}</div>
                                                {/case}
                                                {case value="5"}
                                                <div class="goods_name">消费退款</div>
                                                {/case}
                                                {/switch}
                                                <div class="goods_num">订单号:{$vo.order_number} </div>
                                            </div>
                                        </div>
                                    </td>
                                    {switch name="$vo.type_id"}
                                    {case value="1"}
                                    <td class="text-center number">+{$vo.price}</td>
                                    {/case}
                                    {case value="2"}
                                    <td class="text-center number" style="color:red;">+{$vo.price}</td>
                                    {/case}
                                    {case value="3"}
                                    <td class="text-center number" style="color: lime">-{$vo.price}</td>
                                    {/case}
                                    {case value="5"}
                                    <td class="text-center number" style="color:red;">+{$vo.price}</td>
                                    {/case}
                                    {/switch}
                                    <td class="text-center date">{:date('Y-m-d H:i:s',$vo.create_time)}</td>
                                </tr>
                                {/volist}
                            </table>
                            <div class="pages" style="margin-top: 100px;">{$revenue->render();}</div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
<script>


    function recharge() {
        window.open("{:url('recharge/index')}");
    }
</script>
{include file="public_foot"}